﻿using LogBookImporter.Implementation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tester.Interface;

namespace Tester.Tests {
    public class CrawlerTester : ITester {

        public CrawlerTester() {
            Errors = new List<string>();
        }

        public void Run() {
            TestCrawl();
        }

        private void TestCrawl() {
            try {
                List<string> logBookFileLocations = LogBookCrawler.Crawl(@"C:\DEV\Ellipsometer\Logbooks");
            }
            catch(Exception e) {
                Errors.Add(string.Format("CrawlerTester: Error in TestCrawl(). Exception: {0}. Inner exception: {1}.", e.Message, e.InnerException));
            }
            
        }

        public List<string> Errors {
            get;
            set;
        }
    }
}
